﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCGioHang.ascx.cs" Inherits="WebUserControlGioHang" %>
<style type="text/css">
    .auto-style1 {
        width: 100%;
    }
    .auto-style4 {
        width: 287px;
    }
    .auto-style5 {
        width: 295px;
    }
</style>
<div style="text-align: center">
<asp:Label ID="lb" runat="server" Text="GIỎ HÀNG CỦA BẠN" Font-Size="X-Large" ForeColor="Red"> </asp:Label>
    <MARQUEE bgcolor ="orange" BEHAVIOR="ALTERNATE"> <span style="font-size:150%">Đây là giỏ hàng của bạn<a target="_blank"> hãy đặt hàng nhanh với Bookshop!</a> </span> </MARQUEE
      <br />
                    <br />
                    <asp:Panel ID="Panel4" runat="server" BackColor="#EFF3FB" BorderColor="#0033CC" Width="100%">
                        <table style="width: 461px">
                            <tr align="left">
                                <td>Tài khoản </td>
                                <td class="auto-style5">
                                    <asp:Label ID="lblTaiKhoan" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr align="left">
                                <td>Tên người nhận: </td>
                                <td class="auto-style5">
                                    <asp:TextBox ID="txtTenNguoiNhan" runat="server" Width="248px"></asp:TextBox>
                                    (*)</td>
                            </tr>
                            <tr align="left">
                                <td>Số điện thoại người nhận</td>
                                <td class="auto-style5">
                                    <asp:TextBox ID="txtSoDienThoaiNguoiNhan" runat="server" Width="248px"></asp:TextBox>
                                    (*)</td>
                            </tr>
                            <tr align="center">
                                <td style="text-align: left">Địa chỉ nhận: </td>
                                <td align="left" class="auto-style5">
                                    <asp:TextBox ID="txtDiaChiNhan" runat="server" TextMode="MultiLine" Height="63px" Width="250px"></asp:TextBox>
                                    &nbsp;(*)</td>
                            </tr>
                        </table>
                    </asp:Panel>
</div>

<table class="auto-style1">
    <tr>
        <td style="text-align: center">
            <asp:Panel ID="Panel1" runat="server">
                <table style=" width:100%;" id="tb1" >
                    <tr>
                        <td align="center" class="style1">
                            <asp:GridView ID="grv_GioHang" runat="server"
          AutoGenerateColumns="False"
          DataKeyNames="MaSach"
          OnRowCancelingEdit="grv_RowCancelingEdit"
          OnRowDeleting="grv_RowDeleting"
          OnRowUpdating="grv_RowUpdating"
          ShowFooter="True" OnRowEditing="grv_GioHang_RowEditing" Width="100%" CellPadding="4" ForeColor="#333333" GridLines="None"
          >
                                <AlternatingRowStyle BackColor="White" />
                                <Columns>
                                    <asp:TemplateField HeaderText="Tên sách">
                                        <EditItemTemplate>
                                            <asp:Label ID="lblTenSach" runat="server" Text='<%# Bind("tensach") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lblTenSach" runat="server" Text='<%# Bind("TenSach") %>' Width="150px"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Giá tiền">
                                        <EditItemTemplate>
                                            <asp:Label ID="lblGiaTien" runat="server" Text='<%# Eval("GiaTien") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="lbGiaTien" runat="server" Text='<%# Bind("GiaTien") %>' Width="150px"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Số lượng">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSoLuong" runat="server" Text='<%# Bind("SoLuong") %>' Width="150px"></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtSoLuong" runat="server" Text='<%# Eval("SoLuong") %>' style="text-align: center"></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Sửa">
                                        <ItemTemplate>
                                            <asp:ImageButton ID="imgbtn1" runat="server" ToolTip="Sửa" CommandName="Edit" ImageUrl="~/Images/User/edit.png"/>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:ImageButton ID="imgbtn2" runat="server" ToolTip="Update" CommandName="Update" ImageUrl="~/Images/User/Save.png" />
                                            &nbsp;&nbsp;
                                            <asp:ImageButton ID="imgbtn3" runat="server" CommandName="Cancel" ImageUrl="~/Images/User/back.png" ToolTip="Cancel" />
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Xóa">
                                        <ItemTemplate>
                                            <asp:ImageButton ID="imgbtn4" ToolTip="Delete" CommandName="Delete" runat="server" ImageUrl="~/Images/User/Delete.png"/>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <EditRowStyle BackColor="#2461BF" />
                                <EmptyDataTemplate>
                                    Chưa có sách được chọn...!<br />
                                    <asp:HyperLink ID="hplTrangchu" runat="server" NavigateUrl="~/SACHGIALAP.aspx">Để mua sách mời ấn vào đây!</asp:HyperLink>
                                </EmptyDataTemplate>
                                <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#EFF3FB" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                <SortedDescendingHeaderStyle BackColor="#4870BE" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" class="style1" style="background-color: #EFF3FB">
                            <asp:Button ID="btnThanhToan" runat="server" OnClick="Thanhtoan_Click" Text="Đặt hàng"  OnClientClick="return confirm('Bạn chấp nhận đặt mua tất cả sách đã chọn?')" BorderColor="#0033CC" BorderStyle="Double" BorderWidth="5px" ForeColor="#0033CC" ToolTip="Đặt hàng đã chọn"/>
                            <asp:Button ID="btnMuaThem" runat="server" OnClick="Muathem_Click"  Text="Mua thêm" BorderColor="#0033CC" BorderStyle="Double" BorderWidth="5px" ForeColor="#0033CC" ToolTip="Tiếp tục mua thêm"/>
                            <asp:Button ID="btnHuyGiohang" runat="server" OnClick="Huygiohang_Click" Text=" Hủy giỏ hàng" OnClientClick="return confirm('Bạn muốn xóa all')" BackColor="White" BorderColor="#0033CC" BorderStyle="Double" BorderWidth="5px" EnableTheming="True" ForeColor="#0033CC" ToolTip="Huỷ giỏ hàng" Visible="False" Width="89px"/>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </td>
    </tr>
    <tr>
        <td style="text-align: center">
          <asp:Label ID="lblTongTien" runat="server" ForeColor="Blue"></asp:Label>
        </td>
    </tr>
    <tr>
        <td style="text-align: center">
          <asp:Label ID="LbThongbao" runat="server" ForeColor="Blue" style="color: #FF0066"></asp:Label>
            <br />
            <asp:HyperLink ID="hplTrangchu0" runat="server" NavigateUrl="~/Page_User/Default.aspx">Để mua sách mời ấn vào đây!</asp:HyperLink>
            </td>
    </tr>
</table>


                <asp:Panel ID="Panel3" runat="server" style="text-align: center">
                    <asp:Label ID="lblDangKy" runat="server" Text="Bạn chưa "></asp:Label>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Page_User/Default.aspx?page=dangnhap">đăng nhập!</asp:HyperLink>
                    <br />
                    <asp:Label ID="lblDangKy0" runat="server" Text="Hoặc bạn chưa đăng ký vui lòng "></asp:Label>
                    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Page_User/Default.aspx?page=dangky">đăng ký!</asp:HyperLink>
                </asp:Panel>



